
"""
.read()      读取打开文件的所有数据
.readline()  读取文件的一样数据，可以设置读取字节数
.readlines() 读取文件的每一行数据，返回一个list
"""
with open("hello.txt", mode='r', encoding='utf-8') as f:
    # print(f.read())
    # text = f.readline()

    # while True:
    #     text = f.readline()
    #     print(text)
    #     if text == "":
    #         break
    text = f.readlines()
    for t in text:
        print(t)